package edu.gdkm.mapper;

import edu.gdkm.controller.request.BaseRequest;
import edu.gdkm.entity.Borrow;
import edu.gdkm.entity.Retur;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BorrowMapper {
    List<Borrow> list();

    List<Borrow> listByCondition(BaseRequest baseRequest);
    List<Retur> listReturCondition(BaseRequest baseRequest);

    void save(Borrow obj);
    void saveRetur(Retur obj);

    Borrow getById(Integer id);


    void updateById(Borrow book);

    void deleteById(Integer id);


    void deleteReturById(Integer id);

    void updateStatus( @Param("status") String status, @Param("id") Integer id);
}
